package com.qianli.cashmama.trade.client.trade.request;

import com.fqgj.common.api.ParamsObject;
import org.apache.commons.lang.StringUtils;

/**
 * @program: market-loan-trade
 * @description
 * @author: frank
 * @create: 2020-12-09 11:10
 **/
public class UserTradeListQueryRO extends ParamsObject {

    private String userCode;

    private Integer orderStatus;

    private Boolean needCardInfo = false;

    /**
     * 商户号
     */
    private String merchantCode;

    public String getMerchantCode() {
        return merchantCode;
    }

    public UserTradeListQueryRO setMerchantCode(String merchantCode) {
        this.merchantCode = merchantCode;
        return this;
    }

    public Boolean getNeedCardInfo() {
        return needCardInfo;
    }

    public UserTradeListQueryRO setNeedCardInfo(Boolean needCardInfo) {
        this.needCardInfo = needCardInfo;
        return this;
    }

    public String getUserCode() {
        return userCode;
    }

    public UserTradeListQueryRO setUserCode(String userCode) {
        this.userCode = userCode;
        return this;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public UserTradeListQueryRO setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
        return this;
    }

    @Override
    public void validate() {
        if(StringUtils.isEmpty(merchantCode)){
            merchantCode = null;
        }
    }
}
